package com.wh.wisdomsite.xbox.us.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 部门实体
 *
 * @version V1.0
 * @Package: com.wh.wisdomsite.xbox.us.entity
 * @author: 杨世强
 * @date: 2018-08-06 14:12
 * @Copyright 公司版权所有
 * @Company 贵州万华科技有限公司Copyright (c) 2016
 **/
@TableName("us_office")
public class Office extends Model<Office> {


    /**
     * PK, 部门ID
     */
    @TableId(type = IdType.AUTO)
    private Integer officeId;

    /**
     * FK,所属公司ID
     */
    @TableField("companyId")
    private Integer companyId;

    /**
     * 公司名称
     */
    @TableField(exist = false)
    private String cname;


    /**
     * 父级编号 0表示根
     */
    @TableField("parentId")
    private Integer parentId;

    /**
     * 部门编码，用于做数据权限
     */
    @TableField("officeCode")
    private String officeCode;

    /**
     * 名称
     */
    @TableField("name")
    private String name;

    /**
     * 负责人
     */
    @TableField("principal")
    private String principal;

    /**
     * 负责人电话
     */
    @TableField("principalTel")
    private String principalTel;

    /**
     * 固定电话
     */
    @TableField("landlinePhone")
    private String landlinePhone;

    /**
     * 传真
     */
    @TableField("fax")
    private String fax;

    /**
     * 邮箱
     */
    @TableField("email")
    private String email;

    /**
     * 排序
     */
    @TableField("sort")
    private String sort;

    /**
     * 创建者
     */
    @TableField("createBy")
    private String createBy;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("createDate")
    private Date createDate;

    /**
     * 创建时间格式化
     */
    @TableField(exist = false)
    private String createDateFormat;


    /**
     * 更新者
     */
    @TableField("updateBy")
    private String updateBy;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("updateDate")
    private Date updateDate;

    /**
     * 备注信息
     */
    @TableField("remark")
    private String remark;

    /**
     * 数据状态
     */
    @TableField("dataState")
    private String dataState;

    /**
     * 子菜单
     */
    @TableField(exist = false)
    private List<Office> children;

    public Integer getOfficeId() {
        return officeId;
    }

    public void setOfficeId(Integer officeId) {
        this.officeId = officeId;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getOfficeCode() {
        return officeCode;
    }

    public void setOfficeCode(String officeCode) {
        this.officeCode = officeCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPrincipal() {
        return principal;
    }

    public void setPrincipal(String principal) {
        this.principal = principal;
    }

    public String getPrincipalTel() {
        return principalTel;
    }

    public void setPrincipalTel(String principalTel) {
        this.principalTel = principalTel;
    }

    public String getLandlinePhone() {
        return landlinePhone;
    }

    public void setLandlinePhone(String landlinePhone) {
        this.landlinePhone = landlinePhone;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getCreateDateFormat() {
        return createDateFormat;
    }

    public void setCreateDateFormat(String createDateFormat) {
        this.createDateFormat = createDateFormat;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getDataState() {
        return dataState;
    }

    public void setDataState(String dataState) {
        this.dataState = dataState;
    }

    public List<Office> getChildren() {
        return children;
    }

    public void setChildren(List<Office> children) {
        this.children = children;
    }


    @Override
    protected Serializable pkVal() {
        return this.officeId;
    }
}
